<template>
	<el-container direction="vertical">
		<el-header>
			<el-radio-group v-model="curComponent">
				<el-radio-button v-for="item in tagList" :key="item.component" :label="item.component">{{
					item.label
				}}</el-radio-button>
			</el-radio-group>
		</el-header>
		<component :is="curComponent" />
	</el-container>
</template>
<script>
import SearchForm from "@/components/SearchForm/index.vue";
import Arrearage from "./components/arrearage/index.vue";
import BuyClass from "./components/buyClass/index.vue";
import BuyClassCombo from "./components/buyClassCombo/index.vue";
import BuyCourseCombo from "./components/buyCourseCombo/index.vue";
import Refund from "./components/refund/index.vue";
import TurnClass from "./components/turnClass/index.vue";
import { tagList } from "./date";
export default {
	data() {
		return {
			list: {
				params: {},
			},
			curComponent: tagList[0].component,
			tagList: Object.freeze(tagList),
		}
	},
	components: {
		SearchForm,
		Arrearage,
		BuyClass,
		BuyClassCombo,
		BuyCourseCombo,
		Refund,
		TurnClass
	},
	methods: {
		search(searchParams) {
			const params = Object.assign({}, this.list.params, searchParams);
			this.$refs.table.reload(params);
		},
	}
}
</script>
